package cn.wicking.proxy.dynamicProxy;

import org.junit.Test;

import java.lang.reflect.Proxy;

public class Client {

    @Test
    public void test(){
        final Host host = new Host();
        final ProxyInvocationHandler handler = new ProxyInvocationHandler(host);
        final Rent proxy = (Rent) Proxy.newProxyInstance(host.getClass().getClassLoader(), host.getClass().getInterfaces(), handler);
        proxy.rent();

    }
}
